Integrand size = 33, antiderivative size = 139 \[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\frac {g \sqrt {a+b x+c x^2}}{c}-\frac {d \sqrt {a+b x+c x^2}}{a x}+\frac {(b d-2 a e) \text {arctanh}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 a^{3/2}}+\frac {(2 c f-b g) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 c^{3/2}} \]
1/2*(-2*a*e+b*d)*arctanh(1/2*(b*x+2*a)/a^(1/2)/(c*x^2+b*x+a)^(1/2))/a^(3/2 )+1/2*(-b*g+2*c*f)*arctanh(1/2*(2*c*x+b)/c^(1/2)/(c*x^2+b*x+a)^(1/2))/c^(3 /2)+g*(c*x^2+b*x+a)^(1/2)/c-d*(c*x^2+b*x+a)^(1/2)/a/x
Time = 0.93 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.05 \[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\frac {(-c d+a g x) \sqrt {a+x (b+c x)}}{a c x}+\frac {(2 c f-b g) \text {arctanh}\left (\frac {\sqrt {c} x}{-\sqrt {a}+\sqrt {a+x (b+c x)}}\right )}{c^{3/2}}+\frac {(b d-2 a e) \log (x)}{2 a^{3/2}}+\frac {(-b d+2 a e) \log \left (a \left (2 a+b x-2 \sqrt {a} \sqrt {a+x (b+c x)}\right )\right )}{2 a^{3/2}} \]
((-(c*d) + a*g*x)*Sqrt[a + x*(b + c*x)])/(a*c*x) + ((2*c*f - b*g)*ArcTanh[ (Sqrt[c]*x)/(-Sqrt[a] + Sqrt[a + x*(b + c*x)])])/c^(3/2) + ((b*d - 2*a*e)* Log[x])/(2*a^(3/2)) + ((-(b*d) + 2*a*e)*Log[a*(2*a + b*x - 2*Sqrt[a]*Sqrt[ a + x*(b + c*x)])])/(2*a^(3/2))
Time = 0.47 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.09, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {2181, 27, 2184, 1269, 1092, 219, 1154, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx\) |
\(\Big \downarrow \) 2181 |
\(\displaystyle -\frac {\int \frac {-2 a g x^2-2 a f x+b d-2 a e}{2 x \sqrt {c x^2+b x+a}}dx}{a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {-2 a g x^2-2 a f x+b d-2 a e}{x \sqrt {c x^2+b x+a}}dx}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 2184 |
\(\displaystyle -\frac {\frac {\int \frac {c (b d-2 a e)-a (2 c f-b g) x}{x \sqrt {c x^2+b x+a}}dx}{c}-\frac {2 a g \sqrt {a+b x+c x^2}}{c}}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 1269 |
\(\displaystyle -\frac {\frac {c (b d-2 a e) \int \frac {1}{x \sqrt {c x^2+b x+a}}dx-a (2 c f-b g) \int \frac {1}{\sqrt {c x^2+b x+a}}dx}{c}-\frac {2 a g \sqrt {a+b x+c x^2}}{c}}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle -\frac {\frac {c (b d-2 a e) \int \frac {1}{x \sqrt {c x^2+b x+a}}dx-2 a (2 c f-b g) \int \frac {1}{4 c-\frac {(b+2 c x)^2}{c x^2+b x+a}}d\frac {b+2 c x}{\sqrt {c x^2+b x+a}}}{c}-\frac {2 a g \sqrt {a+b x+c x^2}}{c}}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\frac {c (b d-2 a e) \int \frac {1}{x \sqrt {c x^2+b x+a}}dx-\frac {a (2 c f-b g) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c}}}{c}-\frac {2 a g \sqrt {a+b x+c x^2}}{c}}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 1154 |
\(\displaystyle -\frac {\frac {-2 c (b d-2 a e) \int \frac {1}{4 a-\frac {(2 a+b x)^2}{c x^2+b x+a}}d\frac {2 a+b x}{\sqrt {c x^2+b x+a}}-\frac {a (2 c f-b g) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c}}}{c}-\frac {2 a g \sqrt {a+b x+c x^2}}{c}}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\frac {-\frac {c (b d-2 a e) \text {arctanh}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{\sqrt {a}}-\frac {a (2 c f-b g) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c}}}{c}-\frac {2 a g \sqrt {a+b x+c x^2}}{c}}{2 a}-\frac {d \sqrt {a+b x+c x^2}}{a x}\) |
-((d*Sqrt[a + b*x + c*x^2])/(a*x)) - ((-2*a*g*Sqrt[a + b*x + c*x^2])/c + ( -((c*(b*d - 2*a*e)*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])]) /Sqrt[a]) - (a*(2*c*f - b*g)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/Sqrt[c])/c)/(2*a)
3.3.84.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2 Subst[I nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a , b, c}, x]
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym bol] :> Simp[-2 Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c , d, e}, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Simp[(e*f - d*g)/e Int[(d + e*x)^m*(a + b*x + c*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && !IGtQ[m, 0]
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_ ), x_Symbol] :> With[{Qx = PolynomialQuotient[Pq, d + e*x, x], R = Polynomi alRemainder[Pq, d + e*x, x]}, Simp[(e*R*(d + e*x)^(m + 1)*(a + b*x + c*x^2) ^(p + 1))/((m + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Simp[1/((m + 1)*(c*d^2 - b*d*e + a*e^2)) Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p*ExpandToSum[(m + 1)*(c*d^2 - b*d*e + a*e^2)*Qx + c*d*R*(m + 1) - b*e*R*(m + p + 2) - c*e*R *(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, e, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[m, -1]
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p _), x_Symbol] :> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, S imp[f*(d + e*x)^(m + q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*e^(q - 1)*(m + q + 2*p + 1))), x] + Simp[1/(c*e^q*(m + q + 2*p + 1)) Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^q*(m + q + 2*p + 1)*Pq - c*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x)^(q - 2)*(b*d*e*(p + 1) + a*e^2*(m + q - 1) - c *d^2*(m + q + 2*p + 1) - e*(2*c*d - b*e)*(m + q + p)*x), x], x], x] /; GtQ[ q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, d, e, m, p}, x] && Pol yQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && !(IGt Q[m, 0] && RationalQ[a, b, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))
Time = 0.78 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.12
method | result | size |
risch | \(-\frac {d \sqrt {c \,x^{2}+b x +a}}{a x}+\frac {\frac {2 f a \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}+2 a g \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )-\frac {\left (2 a e -b d \right ) \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )}{\sqrt {a}}}{2 a}\) | \(156\) |
default | \(\frac {f \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}+g \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )-\frac {e \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )}{\sqrt {a}}+d \left (-\frac {\sqrt {c \,x^{2}+b x +a}}{a x}+\frac {b \ln \left (\frac {2 a +b x +2 \sqrt {a}\, \sqrt {c \,x^{2}+b x +a}}{x}\right )}{2 a^{\frac {3}{2}}}\right )\) | \(175\) |
-d*(c*x^2+b*x+a)^(1/2)/a/x+1/2/a*(2*f*a*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+ a)^(1/2))/c^(1/2)+2*a*g*(1/c*(c*x^2+b*x+a)^(1/2)-1/2*b/c^(3/2)*ln((1/2*b+c *x)/c^(1/2)+(c*x^2+b*x+a)^(1/2)))-(2*a*e-b*d)/a^(1/2)*ln((2*a+b*x+2*a^(1/2 )*(c*x^2+b*x+a)^(1/2))/x))
Time = 1.34 (sec) , antiderivative size = 703, normalized size of antiderivative = 5.06 \[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\left [-\frac {{\left (2 \, a^{2} c f - a^{2} b g\right )} \sqrt {c} x \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + {\left (b c^{2} d - 2 \, a c^{2} e\right )} \sqrt {a} x \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) - 4 \, {\left (a^{2} c g x - a c^{2} d\right )} \sqrt {c x^{2} + b x + a}}{4 \, a^{2} c^{2} x}, -\frac {2 \, {\left (2 \, a^{2} c f - a^{2} b g\right )} \sqrt {-c} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + {\left (b c^{2} d - 2 \, a c^{2} e\right )} \sqrt {a} x \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) - 4 \, {\left (a^{2} c g x - a c^{2} d\right )} \sqrt {c x^{2} + b x + a}}{4 \, a^{2} c^{2} x}, -\frac {2 \, {\left (b c^{2} d - 2 \, a c^{2} e\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) + {\left (2 \, a^{2} c f - a^{2} b g\right )} \sqrt {c} x \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) - 4 \, {\left (a^{2} c g x - a c^{2} d\right )} \sqrt {c x^{2} + b x + a}}{4 \, a^{2} c^{2} x}, -\frac {{\left (b c^{2} d - 2 \, a c^{2} e\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) + {\left (2 \, a^{2} c f - a^{2} b g\right )} \sqrt {-c} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) - 2 \, {\left (a^{2} c g x - a c^{2} d\right )} \sqrt {c x^{2} + b x + a}}{2 \, a^{2} c^{2} x}\right ] \]
[-1/4*((2*a^2*c*f - a^2*b*g)*sqrt(c)*x*log(-8*c^2*x^2 - 8*b*c*x - b^2 + 4* sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) + (b*c^2*d - 2*a*c^2*e) *sqrt(a)*x*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b* x + 2*a)*sqrt(a) + 8*a^2)/x^2) - 4*(a^2*c*g*x - a*c^2*d)*sqrt(c*x^2 + b*x + a))/(a^2*c^2*x), -1/4*(2*(2*a^2*c*f - a^2*b*g)*sqrt(-c)*x*arctan(1/2*sqr t(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) + (b*c^2* d - 2*a*c^2*e)*sqrt(a)*x*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2)/x^2) - 4*(a^2*c*g*x - a*c^2*d)*sqr t(c*x^2 + b*x + a))/(a^2*c^2*x), -1/4*(2*(b*c^2*d - 2*a*c^2*e)*sqrt(-a)*x* arctan(1/2*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(-a)/(a*c*x^2 + a*b*x + a ^2)) + (2*a^2*c*f - a^2*b*g)*sqrt(c)*x*log(-8*c^2*x^2 - 8*b*c*x - b^2 + 4* sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) - 4*(a^2*c*g*x - a*c^2* d)*sqrt(c*x^2 + b*x + a))/(a^2*c^2*x), -1/2*((b*c^2*d - 2*a*c^2*e)*sqrt(-a )*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(-a)/(a*c*x^2 + a*b*x + a^2)) + (2*a^2*c*f - a^2*b*g)*sqrt(-c)*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) - 2*(a^2*c*g*x - a*c^2*d) *sqrt(c*x^2 + b*x + a))/(a^2*c^2*x)]
\[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\int \frac {d + e x + f x^{2} + g x^{3}}{x^{2} \sqrt {a + b x + c x^{2}}}\, dx \]
Exception generated. \[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.35 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.22 \[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\frac {\sqrt {c x^{2} + b x + a} g}{c} - \frac {{\left (b d - 2 \, a e\right )} \arctan \left (-\frac {\sqrt {c} x - \sqrt {c x^{2} + b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} - \frac {{\left (2 \, c f - b g\right )} \log \left ({\left | 2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} + b \right |}\right )}{2 \, c^{\frac {3}{2}}} + \frac {{\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b d + 2 \, a \sqrt {c} d}{{\left ({\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} - a\right )} a} \]
sqrt(c*x^2 + b*x + a)*g/c - (b*d - 2*a*e)*arctan(-(sqrt(c)*x - sqrt(c*x^2 + b*x + a))/sqrt(-a))/(sqrt(-a)*a) - 1/2*(2*c*f - b*g)*log(abs(2*(sqrt(c)* x - sqrt(c*x^2 + b*x + a))*sqrt(c) + b))/c^(3/2) + ((sqrt(c)*x - sqrt(c*x^ 2 + b*x + a))*b*d + 2*a*sqrt(c)*d)/(((sqrt(c)*x - sqrt(c*x^2 + b*x + a))^2 - a)*a)
Time = 13.67 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.19 \[ \int \frac {d+e x+f x^2+g x^3}{x^2 \sqrt {a+b x+c x^2}} \, dx=\frac {g\,\sqrt {c\,x^2+b\,x+a}}{c}-\frac {e\,\ln \left (\frac {b}{2}+\frac {a}{x}+\frac {\sqrt {a}\,\sqrt {c\,x^2+b\,x+a}}{x}\right )}{\sqrt {a}}+\frac {f\,\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )}{\sqrt {c}}-\frac {b\,g\,\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )}{2\,c^{3/2}}-\frac {d\,\sqrt {c\,x^2+b\,x+a}}{a\,x}+\frac {b\,d\,\mathrm {atanh}\left (\frac {a+\frac {b\,x}{2}}{\sqrt {a}\,\sqrt {c\,x^2+b\,x+a}}\right )}{2\,a^{3/2}} \]
(g*(a + b*x + c*x^2)^(1/2))/c - (e*log(b/2 + a/x + (a^(1/2)*(a + b*x + c*x ^2)^(1/2))/x))/a^(1/2) + (f*log((b/2 + c*x)/c^(1/2) + (a + b*x + c*x^2)^(1 /2)))/c^(1/2) - (b*g*log((b/2 + c*x)/c^(1/2) + (a + b*x + c*x^2)^(1/2)))/( 2*c^(3/2)) - (d*(a + b*x + c*x^2)^(1/2))/(a*x) + (b*d*atanh((a + (b*x)/2)/ (a^(1/2)*(a + b*x + c*x^2)^(1/2))))/(2*a^(3/2))